]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dnd: Stop using getTweenCount()
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 21 Jul 2018 22:46:05 +0000 (00:46 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 7 Aug 2019 16:40:49 +0000 (18:40 +0200)
Those checks were carried over from the very first DND implementation;
if they were ever actually required at all, this is no longer the case
as we moved away from Tweener for all our animations.

The number of cases where an extension is still using Tweener, creates
draggable actors, *AND* requires the checks for proper functioning
should be indistinguishable from zero, so drop the code.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/669

js/ui/dnd.js

index db05f69224c5b12b9ed46cb3c5c47bc7c0d5f1c7..6539443cd8eda10b7cdad2e9f9314ea5a9345e4a 100644 (file)
@@ -6,7 +6,6 @@ const Signals = imports.signals;
 
 const Main = imports.ui.main;
 const Params = imports.misc.params;
-const Tweener = imports.ui.tweener;
 
 // Time to scale down to maxDragActorSize
 var SCALE_ANIMATION_TIME = 250;
@@ -112,9 +111,6 @@ var _Draggable = class _Draggable {
         if (event.get_button() != 1)
             return Clutter.EVENT_PROPAGATE;
 
-        if (Tweener.getTweenCount(actor))
-            return Clutter.EVENT_PROPAGATE;
-
         this._buttonDown = true;
         this._grabActor(event.get_device());
 
@@ -140,9 +136,6 @@ var _Draggable = class _Draggable {
             !global.display.is_pointer_emulating_sequence(event.get_event_sequence()))
             return Clutter.EVENT_PROPAGATE;
 
-        if (Tweener.getTweenCount(actor))
-            return Clutter.EVENT_PROPAGATE;
-
         this._buttonDown = true;
         this._grabActor(event.get_device(), event.get_event_sequence());